<?php

use Illuminate\Support\Facades\Route;
use Modules\Purchasing\Http\Controllers\PurchaseorderController;
use Modules\Purchasing\Http\Controllers\SupplierController;
use Modules\Purchasing\Http\Controllers\ProvisionalreceiptController;
use Modules\Purchasing\Http\Controllers\PurchaseorderdetailController;
use Modules\Purchasing\Http\Controllers\InspectionlistController;
use Modules\Purchasing\Http\Controllers\PurchasingController;
use Modules\Purchasing\Http\Controllers\PurchasewarehousController;
use Modules\Purchasing\Http\Controllers\PurchasereturnController;
use Modules\Purchasing\Http\Controllers\BarcodeController;

Route::prefix('purchasing')->group(function(){
	Route::GET('casenumber/{id}', [BarcodeController::class, 'casenumber']);//箱号-查询状态
	Route::GET('codenumber/{id}', [BarcodeController::class, 'codenumber']);//箱号-追踪

    //采购订单接口
	Route::apiResource('purchaseorderdetail', PurchaseorderdetailController::class);
	Route::apiResource('purchaseorder', PurchaseorderController::class);
	Route::GET('popupList', [PurchaseorderController::class, 'popupList']);//供应弹窗接口
	Route::PUT('update', [PurchaseorderController::class, 'update']);

	//供应商送货接口
	Route::apiResource('supplier', SupplierController::class);
	Route::PUT('auditupdate/{id}', [SupplierController::class, 'auditupdateApi']);
	Route::GET('barcodeApi/{id}', [SupplierController::class, 'barcodeApi']);//条码列表接口
	Route::POST('barcodePrinting', [SupplierController::class, 'barcodePrinting']);//条码箱号打印接口
	Route::POST('codePdf', [SupplierController::class, 'codePdf']);//条码箱号打印接口
	Route::POST('codePdfall/{id}', [SupplierController::class, 'codePdfall']);//条码箱号打印接口
	Route::GET('barcodeApiscan/{id}', [SupplierController::class, 'barcodeApiscan']);//PDA扫码接口
	Route::GET('categoryApi/{id}', [SupplierController::class, 'categoryApi']);//品号打印接口
	Route::POST('barcodevoid', [SupplierController::class, 'barcodevoid']);//品号做费
	Route::PUT('modifydata', [SupplierController::class, 'modifydataapi']);//到货箱数修改
	

	
	// Route::POST('Postcategory', [SupplierController::class, 'PostcategoryData']);//生成品名数据
	// Route::PUT('Postcategorymodify/{id}', [Postcategorymodify::class, 'PostcategoryData']);//修改接口

	//暂收单接口
	Route::apiResource('provisionalreceipt', ProvisionalreceiptController::class);
	Route::POST('interfaceApi/',[ProvisionalreceiptController::class, 'interfaceApi']);
	// Route::GET('Notinspected',[ProvisionalreceiptController::class, 'Notinspected']);//未质检单
	Route::apiResource('purchasing', PurchasingController::class);

	//检验单
	Route::apiResource('inspectionlist', InspectionlistController::class);
	Route::PUT('examinePda/{id}', [InspectionlistController::class, 'examinePda']);//检验单审核接口
	Route::GET('checkPda/{id}', [InspectionlistController::class, 'checkPda']);
	Route::POST('updateCheck', [InspectionlistController::class, 'updateCheck']);//修改接口
	Route::POST('Dataaddition', [InspectionlistController::class, 'Dataaddition']);//数据添加接口
	Route::POST('checksingle/{id}', [InspectionlistController::class, 'checksingle']);//检验单-数据检验接口
	
	//检验单列表
	Route::GET('indexList', [InspectionlistController::class, 'indexList']);

	//采购入库单
	Route::apiResource('purchasewarehous', PurchasewarehousController::class);
	Route::GET('purchaseininbound/{id}',[PurchasewarehousController::class, 'purchaseininbound']);//扫描流程
	Route::PUT('updatedata/{id}',[PurchasewarehousController::class, 'updatedata']);//赠品数修改
	Route::PUT('summaryupdatedata/{id}',[PurchasewarehousController::class, 'summaryupdatedata']);//赠品数据修改
	Route::PUT('purchaseexamine/{id}',[PurchasewarehousController::class, 'purchaseexamine']);//审核接口
	Route::POST('purchasepush/',[PurchasewarehousController::class, 'purchasepush']);//组织间的采购订单数据录入
	Route::GET('purchasepushcode/{id}',[PurchasewarehousController::class, 'purchasepushcode']);//组织间的采购订单数据录入 PDA扫描
	Route::POST('purchasepushupdate',[PurchasewarehousController::class, 'purchasepushupdate']);//组织间的采购订单数据录入 PDA扫描 金蝶推送接口
	Route::get('processing', [PurchasewarehousController::class, 'processing']);//数据处理

	//采购退货单
	Route::apiResource('purchasereturn', PurchasereturnController::class);
	Route::GET('purchasereturncode/{id}',[PurchasereturnController::class, 'purchaseininbound']);//采购退货货单PDA扫描接口
	Route::PUT('purchasereturnexamine/{id}',[PurchasereturnController::class, 'purchaseexamine']);//审核接口
	Route::GET('intertissueturn/{id}',[PurchasereturnController::class, 'intertissueturn']);//组织间的采购订单数据录入 PDA扫描 
	Route::POST('returndata/',[PurchasereturnController::class, 'returndata']);//组织间的采购订单数据录入 数据添加接口
	//Route::PUT('updatedata/{id}',[PurchasereturnController::class, 'updatedata']);//赠品数修改
	//Route::PUT('summaryupdatedata/{id}',[PurchasereturnController::class, 'summaryupdatedata']);//赠品数据修改

	

});

